#include "heap.h"
void Test1()
{
    int arr[] = {1,3,5,7,9,2,4,6,8,10,123,33,456,765};
    int len = sizeof(arr)/sizeof(int);
    printf("排序前:\n");
    for (int i = 0; i < len; ++i)
    {
        printf("%d ",arr[i]);
    }
    printf("\n");
    HeapSort(arr,len);
    printf("排序后:\n");
        for (int i = 0; i < len; ++i)
    {
        printf("%d ",arr[i]);
    }
    printf("\n");

}
int main()
{
    Test1(); //堆排序
//    Test2(); //解决topK问题
    return 0;
}